View Javadoc

1   package uba.db.column;
2   
3   import java.io.DataInput;
4   import java.io.DataOutput;
5   
6   import uba.db.column.io.ColumnReader;
7   import uba.db.column.io.ColumnWriter;
8   import uba.db.table.Table;
9   
10  /***
11   * @version $Revision: 1.1 $
12   */
13  public class Column {
14      private Table table;
15      private ColumnSpecification specification;
16      
17      public Column(Table table, ColumnSpecification specification) {
18          this.table = table;
19          this.specification = specification;
20      }
21  
22      public String name() {
23          return specification.name();
24      }
25  
26      public ColumnConstraint constraint() {
27          return specification.constraint();
28      }
29  
30      public String dataTypeDisplayString() {
31          return specification.dataTypeDisplayString();
32      }
33  
34      public Table table() {
35          return table;
36      }
37      
38      /***
39       * @see java.lang.Object#toString()
40       */
41      public String toString() {
42          return specification.toString();
43      }
44  
45      public ColumnReader readerFor(DataInput in) {
46          return specification.readerFor(in);
47      }
48  
49      public ColumnWriter writerFor(DataOutput out) {
50          return specification.writerFor(out);
51      }
52  }